package com.ruoyi.project.system.water.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.water.mapper.DormitoryPowerWaterMapper;
import com.ruoyi.project.system.water.domain.DormitoryPowerWater;
import com.ruoyi.project.system.water.service.IDormitoryPowerWaterService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 宿舍水电管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-05
 */
@Service
public class DormitoryPowerWaterServiceImpl implements IDormitoryPowerWaterService 
{
    @Autowired
    private DormitoryPowerWaterMapper dormitoryPowerWaterMapper;

    /**
     * 查询宿舍水电管理
     * 
     * @param iid 宿舍水电管理主键
     * @return 宿舍水电管理
     */
    @Override
    public DormitoryPowerWater selectDormitoryPowerWaterByIid(Long iid)
    {
        return dormitoryPowerWaterMapper.selectDormitoryPowerWaterByIid(iid);
    }

    /**
     * 查询宿舍水电管理列表
     * 
     * @param dormitoryPowerWater 宿舍水电管理
     * @return 宿舍水电管理
     */
    @Override
    public List<DormitoryPowerWater> selectDormitoryPowerWaterList(DormitoryPowerWater dormitoryPowerWater)
    {
        return dormitoryPowerWaterMapper.selectDormitoryPowerWaterList(dormitoryPowerWater);
    }

    /**
     * 新增宿舍水电管理
     * 
     * @param dormitoryPowerWater 宿舍水电管理
     * @return 结果
     */
    @Override
    public int insertDormitoryPowerWater(DormitoryPowerWater dormitoryPowerWater)
    {
        return dormitoryPowerWaterMapper.insertDormitoryPowerWater(dormitoryPowerWater);
    }

    /**
     * 修改宿舍水电管理
     * 
     * @param dormitoryPowerWater 宿舍水电管理
     * @return 结果
     */
    @Override
    public int updateDormitoryPowerWater(DormitoryPowerWater dormitoryPowerWater)
    {
        return dormitoryPowerWaterMapper.updateDormitoryPowerWater(dormitoryPowerWater);
    }

    /**
     * 批量删除宿舍水电管理
     * 
     * @param iids 需要删除的宿舍水电管理主键
     * @return 结果
     */
    @Override
    public int deleteDormitoryPowerWaterByIids(String iids)
    {
        return dormitoryPowerWaterMapper.deleteDormitoryPowerWaterByIids(Convert.toStrArray(iids));
    }

    /**
     * 删除宿舍水电管理信息
     * 
     * @param iid 宿舍水电管理主键
     * @return 结果
     */
    @Override
    public int deleteDormitoryPowerWaterByIid(Long iid)
    {
        return dormitoryPowerWaterMapper.deleteDormitoryPowerWaterByIid(iid);
    }
}
